/**
 * Copyright &copy; com.nmf All rights reserved.
 */
package com.nmf.site.biz.member.gen.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.nmf.site.common.persistence.DataEntity;

/**
 * 会员信息Entity
 * @author 北冥
 * @version 2018-04-14
 */
public class BizMember extends DataEntity<BizMember> {
	
	private static final long serialVersionUID = 1L;
	private String memberName;		// 名称
	private String invitationCode;		// 邀请码
	private String telNo;		// 电话
	private String password;		// 密码
	private String selfInvitationCode;		// 会员码
	private String address;		// 地址
	private Integer gender;		// 性别
	private Integer level;		// 会员等级
	private Date inDate;		// 加入日期
	private Date endDate;		// 会员到期时间
	private Date beginCreateDate;		// 开始 创建时间
	private Date endCreateDate;		// 结束 创建时间
	
	public BizMember() {
		super();
	}

	public BizMember(String id){
		super(id);
	}

	@Length(min=1, max=64, message="名称长度必须介于 1 和 64 之间")
	public String getMemberName() {
		return memberName;
	}

	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}
	
	@Length(min=0, max=255, message="邀请码长度必须介于 0 和 255 之间")
	public String getInvitationCode() {
		return invitationCode;
	}

	public void setInvitationCode(String invitationCode) {
		this.invitationCode = invitationCode;
	}
	
	@Length(min=1, max=255, message="电话长度必须介于 1 和 255 之间")
	public String getTelNo() {
		return telNo;
	}

	public void setTelNo(String telNo) {
		this.telNo = telNo;
	}
	
	@Length(min=0, max=255, message="密码长度必须介于 0 和 255 之间")
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	@Length(min=0, max=255, message="会员码长度必须介于 0 和 255 之间")
	public String getSelfInvitationCode() {
		return selfInvitationCode;
	}

	public void setSelfInvitationCode(String selfInvitationCode) {
		this.selfInvitationCode = selfInvitationCode;
	}
	
	@Length(min=0, max=255, message="地址长度必须介于 0 和 255 之间")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@NotNull(message="性别不能为空")
	public Integer getGender() {
		return gender;
	}

	public void setGender(Integer gender) {
		this.gender = gender;
	}
	
	@NotNull(message="会员等级不能为空")
	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="加入日期不能为空")
	public Date getInDate() {
		return inDate;
	}

	public void setInDate(Date inDate) {
		this.inDate = inDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	public Date getBeginCreateDate() {
		return beginCreateDate;
	}

	public void setBeginCreateDate(Date beginCreateDate) {
		this.beginCreateDate = beginCreateDate;
	}
	
	public Date getEndCreateDate() {
		return endCreateDate;
	}

	public void setEndCreateDate(Date endCreateDate) {
		this.endCreateDate = endCreateDate;
	}
		
}